import { ref } from 'vue';
import { defineStore } from 'pinia';

export const useSystemConfigStore = defineStore('systemConfig', () => {
  const modeList = ['default', 'card'];
  const MENU_MODE = ref('default');
  function changeMenuMode(mode) {
    if (!modeList.includes(mode)) {
      MENU_MODE.value = 'default';
      console.warn(`菜单风格只能是${modeList}`);
    } else {
      MENU_MODE.value = mode;
    }
  }
  return { MENU_MODE, changeMenuMode };
});
